Skip to content

Conversation

mnocon
Copy link
Contributor

@mnocon mnocon commented Sep 17, 2025

No description provided.

@mnocon mnocon force-pushed the IBX-9737-criterions branch from 81df162 to 7d21645 Compare September 17, 2025 08:54
Copy link

github-actions bot commented Sep 17, 2025

Copy link

code_samples/ change report

Before (on target branch)After (in current PR)

code_samples/collaboration/src/Query/Search.php


code_samples/collaboration/src/Query/Search.php

docs/search/collaboration_search_reference/collaboration_criteria.md@47:```php hl_lines="11-16"
docs/search/collaboration_search_reference/collaboration_criteria.md@48:[[= include_file('code_samples/collaboration/src/Query/Search.php') =]]
docs/search/collaboration_search_reference/collaboration_criteria.md@49:```

001⫶<?php
002⫶
003⫶declare(strict_types=1);
004⫶
005⫶use Ibexa\Contracts\Collaboration\Session\Query\Criterion;
006⫶use Ibexa\Contracts\Collaboration\Session\Query\SortClause;
007⫶use Ibexa\Contracts\Collaboration\Session\SessionQuery;
008⫶
009⫶$now = new DateTimeImmutable();
010⫶
011❇️$query = new SessionQuery(
012❇️ new Criterion\LogicalAnd([
013❇️ new Criterion\IsActive(),
014❇️ new Criterion\Type(‘content’),
015❇️ new Criterion\CreatedAt($now, Criterion\CreatedAt::OPERATOR_LTE),
016❇️ ]),
017⫶ [
018⫶ new SortClause\CreatedAt(SortClause\CreatedAt::SORT_DESC),
019⫶ ]
020⫶);
021⫶
022⫶/** @var \Ibexa\Contracts\Collaboration\SessionServiceInterface $sessionService */
023⫶$results = $sessionService->findSessions($query);

docs/search/collaboration_search_reference/collaboration_sort_clauses.md@34:```php hl_lines="16-18"
docs/search/collaboration_search_reference/collaboration_sort_clauses.md@35:[[= include_file('code_samples/collaboration/src/Query/Search.php') =]]
docs/search/collaboration_search_reference/collaboration_sort_clauses.md@36:```

001⫶<?php
002⫶
003⫶declare(strict_types=1);
004⫶
005⫶use Ibexa\Contracts\Collaboration\Session\Query\Criterion;
006⫶use Ibexa\Contracts\Collaboration\Session\Query\SortClause;
007⫶use Ibexa\Contracts\Collaboration\Session\SessionQuery;
008⫶
009⫶$now = new DateTimeImmutable();
010⫶
011⫶$query = new SessionQuery(
012⫶ new Criterion\LogicalAnd([
013⫶ new Criterion\IsActive(),
014⫶ new Criterion\Type(‘content’),
015⫶ new Criterion\CreatedAt($now, Criterion\CreatedAt::OPERATOR_LTE),
016❇️ ]),
017❇️ [
018❇️ new SortClause\CreatedAt(SortClause\CreatedAt::SORT_DESC),
019⫶ ]
020⫶);
021⫶
022⫶/** @var \Ibexa\Contracts\Collaboration\SessionServiceInterface $sessionService */
023⫶$results = $sessionService->findSessions($query);

Download colorized diff

Copy link
Contributor

@ciastektk ciastektk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove all Criterion suffix from criteria name


| Criterion | Description |
|---|---|
| [CreatedAtCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-CreatedAt.html) | Find invitations based on the date they were created |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| [CreatedAtCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-CreatedAt.html) | Find invitations based on the date they were created |
| [CreatedAt](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-CreatedAt.html) | Find invitations based on the date they were created |

| Criterion | Description |
|---|---|
| [CreatedAtCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-CreatedAt.html) | Find invitations based on the date they were created |
| [IdCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-Id.html) | Find invitations with given invitation ID |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| [IdCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-Id.html) | Find invitations with given invitation ID |
| [Id](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-Id.html) | Find invitations with given invitation ID |

|---|---|
| [CreatedAtCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-CreatedAt.html) | Find invitations based on the date they were created |
| [IdCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-Id.html) | Find invitations with given invitation ID |
| [LogicalAndCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-LogicalAnd.html) | Composite criterion to group multiple invitations using the AND condition |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| [LogicalAndCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-LogicalAnd.html) | Composite criterion to group multiple invitations using the AND condition |
| [LogicalAnd](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-LogicalAnd.html) | Composite criterion to group multiple invitations using the AND condition |

| [CreatedAtCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-CreatedAt.html) | Find invitations based on the date they were created |
| [IdCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-Id.html) | Find invitations with given invitation ID |
| [LogicalAndCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-LogicalAnd.html) | Composite criterion to group multiple invitations using the AND condition |
| [LogicalOrCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-LogicalOr.html) | Composite criterion to group multiple invitations using the OR condition |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| [LogicalOrCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-LogicalOr.html) | Composite criterion to group multiple invitations using the OR condition |
| [LogicalOr](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-LogicalOr.html) | Composite criterion to group multiple invitations using the OR condition |

| [IdCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-Id.html) | Find invitations with given invitation ID |
| [LogicalAndCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-LogicalAnd.html) | Composite criterion to group multiple invitations using the AND condition |
| [LogicalOrCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-LogicalOr.html) | Composite criterion to group multiple invitations using the OR condition |
| [SenderCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-Sender.html) | Find invitations by invitation sender |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| [SenderCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-Sender.html) | Find invitations by invitation sender |
| [Sender](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-Sender.html) | Find invitations by invitation sender |

| [LogicalAndCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-LogicalAnd.html) | Composite criterion to group multiple invitations using the AND condition |
| [LogicalOrCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-LogicalOr.html) | Composite criterion to group multiple invitations using the OR condition |
| [SenderCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-Sender.html) | Find invitations by invitation sender |
| [SessionCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-Session.html) | Find invitations by collaboration session |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| [SessionCriterion](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-Session.html) | Find invitations by collaboration session |
| [Session](/api/php_api/php_api_reference/classes/Ibexa-Contracts-Collaboration-Invitation-Query-Criterion-Session.html) | Find invitations by collaboration session |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants